<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>新增机房</title>
	</head>
	
	<script type="text/javascript">
    function checkname(){
      var v=document.getElementById("motorname");
      if(v.value==""||v.value==null){
       document.getElementById("motornameerror").innerHTML = "机房名称不能为空";
      }else{
       document.getElementById("motornameerror").innerHTML = "";
      }
     }
	</script>

	<body><center>

		<table width="100%" border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td width="17" valign="top" background="images/mail_leftbg.gif">
					<img src="images/left-top-right.gif" width="17" height="29" />
				</td>
				<td valign="top" background="images/content-bg.gif">
					<table width="100%" height="31" border="0" cellpadding="0"
						cellspacing="0" class="left_topbg" id="table2">
						<tr>
							<td height="31">
								<div class="titlebt">
									机房信息
								</div>
							</td>
						</tr>
					</table>
				</td>
				<td width="16" valign="top" background="images/mail_rightbg.gif">
					<img src="images/nav-right-bg.gif" width="16" height="29" />
				</td>
			</tr>
	</table>
			<div class="btwz">
			<br />
			<br /><br /><br />
							
						</div>
						<br />
						<s:form  method="post" name="form" action="motor/addMotor.action" onsubmit="return checkForm(this)"
							>
							<font color="red">${msg }</font>
							<table width="50%" cellspacing="1" cellpadding="3" border="0" bgcolor="#6298e1">
								<tr>
								    <td width="40" nowrap="" height="25"  align="center">
										<div id="some"></div>
									</td>
									<td width="40" nowrap="" height="25"  align="center">
									      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;新增机房信息
									</td>
								
									
								</tr>
								
								<tr bgcolor="#ebf2f9" onmouseout="this.style.backgroundColor = ''" style="" onmouseover="this.style.backgroundColor = '#FFFFFF'">
									<td nowrap="" height="30" align="center">
										&nbsp;&nbsp;&nbsp;&nbsp;机房名称 ：
									</td>
									<td nowrap="" height="30" align="center" valign="middle">
									 <input type="text" id="motorname" onblur="checkname()" onfocus="namefocus()"  name="m.motname" style="border:0;background:transparent; font-size:18px;height:1em;padding: 0px 0px 0px 130px;" />
									 <font color="blue" id="motornameerror"></font>
									</td>
								</tr>
								
							
								<tr bgcolor="#ebf2f9" onmouseout="this.style.backgroundColor = ''" style="" onmouseover="this.style.backgroundColor = '#FFFFFF'">
									<td nowrap="" height="30" align="center">
										&nbsp;&nbsp;&nbsp;&nbsp;所属部门：
									</td>
							
									<td nowrap="" height="30" align="center" >
									  <select name="m.UDept.deptid" style="border:0;background:transparent; font-size:18px;width:80px;height:20px;" >
									  
										  <s:iterator value="deptlist" var="list">
									        <option value="${list.deptid }" >${list.deptname}</option>
				     	                 </s:iterator>
					                    </select>
										
									</td>
					            
								</tr>
								
								<tr bgcolor="#ebf2f9" onmouseout="this.style.backgroundColor = ''" style="" onmouseover="this.style.backgroundColor = '#FFFFFF'">
									<td nowrap="" height="30" align="center">
										&nbsp;&nbsp;&nbsp;&nbsp; 机房地址：
									</td>
									<td nowrap="" height="30" align="center">
									 <input type="text" name="m.motaddr" style="border:0;background:transparent; font-size:18px;height:1em;padding: 0px 10px 0px 130px;" "/>
									</td>
									
								</tr>

								<tr bgcolor="#ebf2f9" onmouseout="this.style.backgroundColor = ''" style="" onmouseover="this.style.backgroundColor = '#FFFFFF'">
									<td nowrap="" height="30" align="center">
										&nbsp;&nbsp;&nbsp;&nbsp;机房管理者：
									</td>
							
									<td nowrap="" height="30" align="center" >
									  <select name="m.UUser.uid" style="border:0;background:transparent; font-size:18px;width:80px;height:20px;" >
									  
										  <s:iterator value="emplist" var="list">
									        <option value="${list.uid }">${list.uname}</option>
				     	                 </s:iterator>
					                    </select>
										
									</td>
					            
								</tr>


								<tr bgcolor="#ebf2f9" onmouseout="this.style.backgroundColor = ''" style="" onmouseover="this.style.backgroundColor = '#FFFFFF'">
									<td nowrap="" height="30" align="center">
										&nbsp;&nbsp;&nbsp;&nbsp; 备注：
									</td>
									<td nowrap="" height="30" align="center">
									 <input type="text" name="m.motnote" style="border:0;background:transparent; font-size:18px;height:1em;padding: 0px 10px 0px 130px;" "/>
									</td>
									
								</tr>
								
							</table>
							<p align="center">
								<input type="submit" class="button" value="提交 &raquo;" />
								&nbsp;
							</p>
						</s:form>
						<br />
						<br />
			            <br />
			            <br />
			<div style="margin-left:180px">
		<table width="99%" align="center">
			<tr>
				<td class="left_txt">
								<img src="images/icon-mail2.gif" width="16" height="11">
								&nbsp;&nbsp;&nbsp;&nbsp;邮箱：liuyongwade@gmail.com
								&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
								组员：刘勇&nbsp;&nbsp;程署&nbsp;&nbsp;陈皓&nbsp;&nbsp;席晓明&nbsp;&nbsp;刘广云
								&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;版权所有 侵权必究
							</td>
						</tr>
						</table>
						</div>
					</center>
	
	</body>
</html>
	